home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: boeing.comp.unix,comp.lang.c,comp.lang.c++,comp.sources.wanted
- Path: in1.uu.net!bcstec!roloff
- From: roloff@bcstec.ca.boeing.com (Craig Roloff)
- Subject: Re: regular expression matching source code
- Message-ID: <Dn18y8.JA5@bcstec.ca.boeing.com>
- Organization: The Boeing Company
- References: <DMwHzn.LIF@bcstec.ca.boeing.com>
- Distribution: na
- Date: Mon, 19 Feb 1996 17:08:31 GMT
-
- In article <DMwHzn.LIF@bcstec.ca.boeing.com>,
- Todd Waetzig <waetzig@bcstec.ca.boeing.com> wrote:
- >I am looking for the 'C' or 'C++' source for a function to
- >perform a match of a string. This function would
- >use the syntax of regular expressions. This regular
- >expression matching would be similar to that used by
- >grep and sed.
- >
- >Ideally it would look something like
- >
- >if (match("^1([A-Z]*|[0-9]*)Z?",string_to_search) == 0)
- > printf("match found ");
- >
- >this would match a string_to_search if it
- > began with a digit 1
- > followed by any number of occurences of uppercase letters
- > or by any number of occurrences of digits
- > followed by zero or one occurrence of the letter Z
- >
- >Thanks,
- >
- >--
- >Todd Waetzig Programmer/Analyst Boeing Computer Services
- > waetzig@bcstec.ca.boeing.com
-
- If you have access to a SysV UNIX machine, do a man on regexp.
- These are a set of regular expression matching routines. On
- all the machines I've seen, the actual code is in the include
- file itself, typically /usr/include/regexp.h. Let me know if
- you don't have access and I can e-mail the file.
- --
- _____ Craig A Roloff
- /_[__T__\___ roloff@bcstec.boeing.com
- { CAR |- | ) 206.237.7660
- `(_)----(_)-' (usual disclaimers apply)
-